/**
 * 
 */
package tarena.netctoss.service.impl;

import java.util.List;

import tarena.netctoss.dao.Pagination;
import tarena.netctoss.dao.RightCondition;
import tarena.netctoss.dao.RightDao;
import tarena.netctoss.po.Right;
import tarena.netctoss.service.RightService;

/**
 * 
 * @author Wangpeihu
 * @team [Never give up]
 * @since JDK1.6(建议)
 * @date 2010-3-10
 */

public class RightServcieImpl implements RightService {

	private RightDao rightDao;

	/*
	 * (non-Javadoc)
	 * 
	 * @see
	 * tarena.netctoss.service.RightService#delete(tarena.netctoss.po.Right)
	 */
	@Override
	public void delete(Right right) {
		rightDao.delete(right);
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @seetarena.netctoss.service.RightService#findAll(tarena.netctoss.dao.
	 * RightCondition)
	 */
	@Override
	public List<Right> findAll(RightCondition rc) {
		return null;
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see tarena.netctoss.service.RightService#findAll()
	 */
	@Override
	public List<Right> findAll() {
		// TODO Auto-generated method stub
		return rightDao.findAll();
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @seetarena.netctoss.service.RightService#findAll(tarena.netctoss.dao.
	 * RightCondition, tarena.netctoss.dao.Pagination)
	 */
	@Override
	public List<Right> findAll(RightCondition rc, Pagination page) {
		rightDao.loadMaxPage(page, rc);
		return rightDao.findAll(page, rc);
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see tarena.netctoss.service.RightService#findById(java.lang.Integer)
	 */
	@Override
	public Right findById(Integer id) {
		return rightDao.findById(id);
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see tarena.netctoss.service.RightService#save(tarena.netctoss.po.Right)
	 */
	@Override
	public void save(Right right) {
		rightDao.save(right);
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see
	 * tarena.netctoss.service.RightService#update(tarena.netctoss.po.Right)
	 */
	@Override
	public void update(Right right) {
		rightDao.update(right);
	}

	public void setRightDao(RightDao rightDao) {
		this.rightDao = rightDao;
	}

}
